
<div id="welcome">
	<a id="toggle_register_login" href="/user/reg/">创建新账号</a>
	<h3>登录</h3>

	<%= form_for(@user, :url => {:action => 'login'}) do |f| %>

		<% if(request['notice'] == 'reg_successfully') %>
		<span class="label label-success">亲爱的，恭喜您注册成功，请在这里登陆一下吧～</span>
		<% elsif('login_failure' == request['notice']) %>
		<span class="label label-warning">亲爱的，用户名或密码输入有误，再试一下吧 -_-!</span>
		<% end %>
		<table align="center" class="table" style="" rules=none>
		<tr>
			<th>用 户：</th>
			<td><%= f.text_field :name, :class=>'w150', :value => flash['reg_name'] || cookies[:login_name] %></td>
		</tr>
		<tr>
			<th>密 码：</th>
			<td><%= f.password_field :pass, :class=>'w150' %>
				&nbsp;<a href="/user/forgetpass" class="bluelink">忘记密码?</a>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center" style="padding-left: 50px;"><br/>
				<% if mobileUser? %>
				<div style="background-color:#DCFFD7; padding:3px; margin-bottom:3px;">
				系统检测到您正在使用手机上网，我们建议您使用手机版本，请点击：
				<a href="http://m.ttbiji.com"><u>http://m.ttbiji.com</u></a>
				</div>
				<% end %>
				<%= f.submit '安全登录', :class=>'btn btn-primary btn-large' %> &nbsp;&nbsp;
				<button class="btn btn-large" name="button" onclick="reset(); return false;" type="button">重新填写</button>
			<td>
		</tr>
		</table>
	<% end %>

</div>